package tech.aistar.controller;


import org.apache.ibatis.annotations.Param;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import tech.aistar.service.TicketTypeService;

@RestController
@RequestMapping("ticket")
public class TicketTypeController {
    @Autowired
    private TicketTypeService ticketTypeService;

    @GetMapping
    public String getTicketType(){

        return "";
    }

    @GetMapping("{attraction_id}/{name}")
    public Double getPriceByAttractionAndName(@PathVariable Integer attraction_id,@PathVariable String name){
        System.out.println(attraction_id+"==="+name);
        Double price = ticketTypeService.getPriceByAttractionAndName(attraction_id, name);
        System.out.println("价格:"+price);

        return price;
    }
}
